﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using BugTracker.WebUX.WebCode;

namespace BugTracker.WebUX.Admin.Modules.AppCode
{
    public class BTUserControlBase : System.Web.UI.UserControl
    {
        public int Key
        {
            get { return (int?)ViewState[BTHttpApplication.Constants.PRIMARY_KEY] ?? 0; }
            set { ViewState[BTHttpApplication.Constants.PRIMARY_KEY] = value; }
        }

        public bool IsEdit
        {
            get { return (bool?)ViewState[BTHttpApplication.Constants.ACTION_MODE_KEY] ?? false; }
            set { ViewState[BTHttpApplication.Constants.ACTION_MODE_KEY] = value; }
        }

        public object Entity
        {
            get { return ViewState[BTHttpApplication.Constants.ENTITY_KEY]; }
            set { ViewState[BTHttpApplication.Constants.ENTITY_KEY] = value; }
        }
    }
}